﻿using Little.Soldier.SWIFT;
using Little.Soldier.SWIFT.Definition;
using System.ComponentModel;

namespace Little.Soldier.SWIFT.Messages.Category7
{
  public class MT732 : SwiftMessage
  {
    private static SwiftMessageDefinition MessageDefinition;
    private static SwiftTagDefinition U0002;
    private static SwiftTagSubItemDefinition U0003;
    private static SwiftTagDefinition U0004;
    private static SwiftTagSubItemDefinition U0005;
    private static SwiftTagDefinition U0006;
    private static SwiftTagSubItemDefinition U0007;
    private static SwiftTagDefinition U0008;
    private static SwiftTagSubItemDefinition U000E;
    private static SwiftTagSubItemDefinition U000F;
    private static SwiftTagDefinition U0010;

    [Description("Senders TRN")]
    public Tag20 SendersTRN_20
    {
      get
      {
        return new Tag20((SwiftElement) this, 0, (SwiftDefinitionElement) MT732.U0002);
      }
    }

    [Description("Senders TRN")]
    public Tag20 Tag20_SendersTRN
    {
      get
      {
        return this.SendersTRN_20;
      }
    }

    [Description("Presenting Bank’s Reference")]
    public Tag21 PresentingBanksReference_21
    {
      get
      {
        return new Tag21((SwiftElement) this, 0, (SwiftDefinitionElement) MT732.U0004);
      }
    }

    [Description("Presenting Bank’s Reference")]
    public Tag21 Tag21_PresentingBanksReference
    {
      get
      {
        return this.PresentingBanksReference_21;
      }
    }

    [Description("Date of Advice of Payment Acceptance Negotiation")]
    public Tag30 DateOfAdviceOfPaymentAcceptanceNegotiation_30
    {
      get
      {
        return new Tag30((SwiftElement) this, 0, (SwiftDefinitionElement) MT732.U0006);
      }
    }

    [Description("Date of Advice of Payment Acceptance Negotiation")]
    public Tag30 Tag30_DateOfAdviceOfPaymentAcceptanceNegotiation
    {
      get
      {
        return this.DateOfAdviceOfPaymentAcceptanceNegotiation_30;
      }
    }

    [Description("Amount Of Utilisation")]
    public Tag32B AmountOfUtilisation_32B
    {
      get
      {
        return new Tag32B((SwiftElement) this, 0, (SwiftDefinitionElement) MT732.U0008);
      }
    }

    [Description("Amount Of Utilisation")]
    public Tag32B Tag32B_AmountOfUtilisation
    {
      get
      {
        return this.AmountOfUtilisation_32B;
      }
    }

    [Description("Sender To Receiver Information")]
    public Tag72 SenderToReceiverInformation_72
    {
      get
      {
        return new Tag72((SwiftElement) this, 0, (SwiftDefinitionElement) MT732.U0010);
      }
    }

    [Description("Sender To Receiver Information")]
    public Tag72 Tag72_SenderToReceiverInformation
    {
      get
      {
        return this.SenderToReceiverInformation_72;
      }
    }

    public MT732()
      : base(true)
    {
    }

    public MT732(SwiftMessage message)
      : base(message)
    {
    }

    internal override SwiftMessageDefinition MsgDefinition()
    {
      return MT732.MessageDefinition;
    }

    protected override void InitSwiftMessageDefinition()
    {
      MT732.MessageDefinition = new SwiftMessageDefinition("MT732", "Advice of Discharge");
      MT732.U0002 = new SwiftTagDefinition("SendersTRN_20", "Senders TRN");
      MT732.U0002.TagName = ":20:";
      MT732.U0003 = new SwiftTagSubItemDefinition("Reference", "Reference");
      MT732.U0002.Elements.Add((SwiftDefinitionElement) MT732.U0003);
      MT732.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT732.U0002);
      MT732.U0004 = new SwiftTagDefinition("PresentingBanksReference_21", "Presenting Bank’s Reference");
      MT732.U0004.TagName = ":21:";
      MT732.U0005 = new SwiftTagSubItemDefinition("Reference", "Reference");
      MT732.U0004.Elements.Add((SwiftDefinitionElement) MT732.U0005);
      MT732.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT732.U0004);
      MT732.U0006 = new SwiftTagDefinition("DateOfAdviceOfPaymentAcceptanceNegotiation_30", "Date of Advice of Payment Acceptance Negotiation");
      MT732.U0006.TagName = ":30:";
      MT732.U0007 = new SwiftTagSubItemDefinition("Date", "Date");
      MT732.U0006.Elements.Add((SwiftDefinitionElement) MT732.U0007);
      MT732.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT732.U0006);
      MT732.U0008 = new SwiftTagDefinition("AmountOfUtilisation_32B", "Amount Of Utilisation");
      MT732.U0008.TagName = ":32B:";
      MT732.U000E = new SwiftTagSubItemDefinition("Currency", "Currency");
      MT732.U0008.Elements.Add((SwiftDefinitionElement) MT732.U000E);
      MT732.U000F = new SwiftTagSubItemDefinition("Amount", "Amount");
      MT732.U0008.Elements.Add((SwiftDefinitionElement) MT732.U000F);
      MT732.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT732.U0008);
      MT732.U0010 = new SwiftTagDefinition("SenderToReceiverInformation_72", "Sender To Receiver Information");
      MT732.U0010.TagName = ":72:";
      MT732.U0010.Mandatory = false;
      MT732.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT732.U0010);
    }
  }
}
